1. Field of the Invention
The invention relates to a method and apparatus for performing color space conversion, more particularly to a method and apparatus with reduced look-up tables for converting digitized RGB color space signals to digitized YCbCr color space signals.
2. Description of the Related Art
Because signals in the Y (luminance), Cb and Cr (chrominance) color space have the advantage of being readily compressible to result in a lower transmission bandwidth and in a lower data storage requirement over signals in the R (red), G (green) and B (blue) color space, color space conversion from RGB to YCbCr is frequently desired in image and video applications. CCIR 601, which was proposed by the Comite Consultalif International des Radiocommunications (CCIR) establishes the following formulas for converting from the RGB color space to the YCbCr color space: EQU Y=0.299R+0.587G+0.114B (a.1) EQU Cb=0.564(B-Y)+128 (a.2) EQU Cr=0.713(R-Y)+128 (a.3)
Color space conversion is often implemented by employing multipliers or look-up tables to achieve the matrix multiplication operations, and by combining the resultant component products to complete the conversion. The matrix multiplication operations dominate the operating efficiency and the hardware complexity of a color space converting apparatus. Therefore, the number of matrix multiplication operations is crucial. A 3-by-3 multiplication matrix is typically used for converting between any two color spaces of three color components. Although such a multiplication matrix offers flexibility, it is relatively expensive to implement.
To perform the RGB to YCbCr color space conversion of Equations (a.1) to (a.3), a conventional color space converter needs to first perform three matrix multiplication operations to obtain the Y color signal, and then derive the (B-Y) and (R-Y) color difference signals before performing two more matrix multiplication operations to obtain the Cb and Cr color signals, respectively. Although the color space converter requires only five matrix multiplication operations that involve relatively simple hardware, the operating efficiency of the color space converter is relatively poor since the matrix multiplication operations are done in two operating stages.
In order to improve the operating efficiency of the conventional color space converter, Equations (a.2) and (a.3) can be expanded so that the Cb and Cr color signals are entirely in terms of the R, G and B color signals: EQU Cb=-0.169R-0.331G+0.5B+128 (b.1) EQU Cr=0.5R-0.419G-0.081B+128 (b.2)
However, implementation of Equations (a.1), (b.1) and (b.2) requires nine matrix multiplication operations. Although the number of matrix multiplication operations can be reduced to seven by using an arithmetic right-shift operation to implement the two component products that have a coefficient of 0.5, the number of matrix multiplication operations is still more than that required in the implementation of Equations (a.1) to (a.3).
In co-pending U.S. patent application Ser. No. 08/763,539, entitled "Method and Apparatus For Reducing Number of Matrix Operations When Converting RGB Color Space Signals to YCbCr Color Space Signals," and filed on Dec. 10, 1996 by the Applicant, it has been proposed that, by using the characteristics of mutual complement between the coefficients of color component signals, the conversion formula for the Y color signal be rearranged as follows by constructing two color difference signals in terms of any two of the R, G and B color signals in order to reduce the required number of matrix multiplication operations from three to two: EQU Y=R+0.587(G-R)+0.114(B-R) (c.1) EQU Y=G+0.299(R-G)+0.114(B-G) (c.2) EQU Y=B+0.299(R-B)+0.587(G-B) (c.3)
The Cb and Cr conversion formulas can be similarly rewritten in the same manner as follows so as to require only one matrix multiplication operation and one arithmetic right-shift operation: EQU Cb=0.5(B-G)-0.169(R-G)+128 (d.1) EQU Cb=0.5(B-R)+0.331(R-G)+128 (d.2) EQU Cb=0.5[(B-G)-0.338(R-G)]+128 (d.3) EQU Cb=0.5[(B-R)+0.662(R-G)]+128 (d.4) EQU Cr=0.5(R-G)-0.081(B-G)+128 (e.1) EQU Cr=0.5(R-B)+0.419(B-G)+128 (e.2) EQU Cr=0.5[(R-G)-0.162(B-G)]+128 (e.3) EQU Cr=0.5[(R-B)+0.838(B-G)]+128 (e.4)
The above equations present a lot of possible arrangements for converting to YCbCr color space signals. However, other unlisted possible alternatives must be available.
In the aforementioned U.S. patent application, by generating a set of color difference signals in terms of the R, G and B color signals, and by selecting appropriate Y, Cb and Cr conversion formulas, RGB to YCbCr color space conversion can be implemented using only four matrix multiplication operations in a single operating stage, thereby realizing a relatively inexpensive and highly efficient color space converting method and apparatus.
The apparatus disclosed in the aforementioned U.S. patent application comprises means for generating at least two color difference signals, each being in terms of any two of the digitized RGB color space signals, and means for performing first, second, third and fourth matrix multiplication operations of the color difference signals, the first and second matrix multiplication operation performing means having first and second results to be used in conversion for the digitized Y color space signal, the third matrix multiplication operation performing means having a third result to be used in conversion for the digitized Cb color space signal, the fourth matrix multiplication operation performing means having a fourth result to be used in conversion for the digitized Cr color space signal.
While each of the first, second, third and fourth matrix multiplication operations of the embodiments disclosed in the aforementioned U.S. patent application is implemented as a single look-up table to result in a simplified circuit design, it is desirable to further reduce the number and sizes of the look-up tables used therein so that a cost-effective hardware implementation can be achieved while maintaining a high operating efficiency.